package cn.ruituo.adv4.exe;

import java.util.Calendar;
import java.util.Scanner;

public class Zhouri {
    public static void main(String[] args) {
//        Calendar c = Calendar.getInstance();
//        c.set(c.get(Calendar.YEAR), Calendar.JANUARY, 1);
//        int days = c.get(Calendar.DAY_OF_WEEK) - 1;
//        int cha = days == 0 ? 0 : 7 - days;
//        c.add(Calendar.DATE,cha);
//        System.out.println(c.getTime());
        //+7
        //6月的第3个星期日是父亲节
        Calendar c = Calendar.getInstance();
        Scanner input = new Scanner(System.in);

        System.out.println("请输入年份");
        int year = input.nextInt();
        c.set(year,Calendar.JUNE,1);
        c.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        //System.out.println(c.getTime());
        c.set(Calendar.DAY_OF_WEEK_IN_MONTH,3);//
        System.out.println(c.getTime());
    }
}
